﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/ViewMasterPage.Master"
    Inherits="System.Web.Mvc.ViewPage<IEnumerable<Epam.PhotoGallery.Interfaces.DataTransferObjects.BaseTopicInfo>>" %>

<asp:Content ID="Content2" ContentPlaceHolderID="htmlHeader" runat="server">
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        <%=ViewData["currentCategoryName"].ToString() %></h2>
    <%foreach (var topic in Model)
      { %>
    <div class="baseTopicInfo">
        <h3>
            <%=topic.Title%></h3>
        <div id="topicInfoWrapper">
            Creation Date: <span class="creationDate"><%=string.Format("{0:yyyy-MM-dd}",topic.CreationDate)%></span> 
            Author: <span class="author"><%=topic.Author%></span>
        </div>
    </div>
    <%} %>

    
    <div id="commands">
    <%=Html.ActionLink("Add topic", "CreateTopic", new { categoryID = ViewData["currentCategoryID"].ToString() }) %>
    </div>
</asp:Content>
